package game.level.tiles;

import game.gfx.SpriteSheet;

public abstract class Tile
{

	int[][] tileData;
	int spriteDimension;
	
	int id;
	SpriteSheet sheet;
	int x;
	int y;
	boolean solid;

	
	public Tile(int id, SpriteSheet sheet, int xPos, int yPos, boolean isSolid)
	{
		this.id = id;
		this.sheet = sheet;
		this.x = xPos;
		this.y = yPos;
		this.solid = isSolid;
		
		spriteDimension = SpriteSheet.spriteDimension;
		
		tileData = new int[spriteDimension][spriteDimension];
		
		tileData = sheet.getTileData(x, y);
	}
	
	public int getId()
	{
		return id;
	}
	
	public String getCoords()
	{
		String temp = this.x + " " + this.y;
		return temp;
	}
		
	public boolean isSolid()
	{
		return solid;
	}
	
	public int[][] getTileData()
	{
		tileData = sheet.getTileData(x, y);
		return tileData;
	}
	
	public abstract void tick();
}
